package com.lingdong.onlinejudge.model.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 *
 * submit
 */
@TableName(value ="submit")
@Data
public class  Submit implements Serializable {
    /**
     * 主键id
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 代码
     */
    private String submitCode;

    /**
     * 判题信息
     */
    private String judgeInfo;

    /**
     * 判题状态 0-待判题 1-判题中 2-成功 3-失败
     */
    private Integer submitStatus;

    /**
     * 题目id
     */
    private Long topicId;

    /**
     * 考试id
     */
    private Long matchId;

    /**
     * 创建者id
     */
    private Long createBy;


    /**
     * 创建者姓名
     */
    @TableField(exist = false)
    private String createUsername;


    /**
     * 提交经验
     */
    private Integer submitExp;

    /**
     * 创建时间
     */
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;

    /**
     * 判题时间
     */
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date judgeTime;

    /**
     * 更新时间
     */
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateTime;

    /**
     * 逻辑删除
     */
    @TableLogic
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
